package com.cxy.datawarehouse.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Entity
@ApiModel("标准表")
@Table(name = "t_standard_table")
@DynamicInsert
@DynamicUpdate
public class StandardTable implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键 标准表编号
     */
    @Id
    @ApiModelProperty("标准表编号")
    @Column(name = "standard_table_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long standardTableId;

    /**
     * 表名
     */
    @ApiModelProperty("表名")
    @Column(name = "table_name", nullable = false)
    private String tableName;

    /**
     * 物理表名
     */
    @ApiModelProperty("物理表名")
    @Column(name = "phy_table_name", nullable = false)
    private String phyTableName;

    /**
     * 标准表类别编号
     */
    @ApiModelProperty("标准表类别编号")
    @Column(name = "standard_type_id", nullable = false)
    private Long standardTypeId;

    /**
     * 标准表类别名称
     */
    @ApiModelProperty("标准表类别名称")
    @Column(name = "standard_type_name", nullable = false)
    private String standardTypeName;

    /**
     * 数据条数
     */
    @ApiModelProperty("数据条数")
    @Column(name = "data_number", nullable = false)
    private Long dataNumber;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @Column(name = "crete_time", nullable = false)
    private LocalDateTime createTime;

    /**
     * 最后修改时间
     */
    @ApiModelProperty("最后修改时间")
    @Column(name = "update_time", nullable = false)
    private LocalDateTime updateTime;

    /**
     * 上次清洗任务执行时间
     */
    @ApiModelProperty("上次清洗任务执行时间")
    @Column(name = "clean_time", nullable = false)
    private LocalDateTime cleanTime;

    /**
     * 使用状态 （0-停用 1-使用）
     */
    @ApiModelProperty("使用状态")
    @Column(name = "status", nullable = false)
    private LocalDateTime status;
}
